﻿using System.ComponentModel;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows;

namespace TMTemplate
{
	public partial class ReadMore : UserControl
	{
		public ReadMore()
		{
			InitializeComponent();
		}

        [Category("Common Properties")]
        public string Contents
        {
            get { return rootTxt.Text; }
            set { rootTxt.Text = value; }
        }

        [Category("Brushes")]
        public Brush Fill
        {
            get { return (Brush)GetValue(FillProperty); }
            set { SetValue(FillProperty, value); }
        }

        public static readonly DependencyProperty FillProperty = DependencyProperty.Register("Fill", typeof(Brush), typeof(ReadMore), new PropertyMetadata(FillPropertyChanged));
        public static void FillPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ReadMore color = d as ReadMore;
            color.bg.Fill = (Brush)e.NewValue;
        }
	}
}